package com.lantosec.hmrp.modules.morality.vo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.morality.entity.MoralityLevel;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评等级定义 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MoralityLevel对象", description="考评等级定义")
public class MoralityLevelVO extends BaseVO<MoralityLevel> {
    private static final long serialVersionUID = 1L;


    public MoralityLevelVO(MoralityLevel entity){
        this.moralityLevelId = entity.getMoralityLevelId();
        this.moralityLevelName = entity.getMoralityLevelName();
    }

    @Override
    public MoralityLevel convertToEntity(){
        return new MoralityLevel(this);
    }


    @ApiModelProperty(value = "考评等级ID")
    @TableId(value = "morality_level_id", type = IdType.AUTO)
    private Integer moralityLevelId;

    @ApiModelProperty(value = "考评等级名称")
    private String moralityLevelName;
}
